<!DOCTYPE html>
<html>
<meta http-equiv="X-UA-Compatible" content="IE=7">
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<head>
    <title></title>
    <!--引入样式和JS-->
    <!---->
    <link rel="stylesheet" href="/static/Skins_/css/blue/reset.css" type="text/css" />
    <link rel="stylesheet" href="/static/Skins_/css/blue/global.css" type="text/css" />
    <script src="/static/loadjs1.js"></script>
    <!--tableEx需要引入-->
    <link rel="stylesheet" href="/static/Skins_/tableEx/images/tableEx.css"/>
    <script type="text/javascript" src="/static/Skins_/tableEx/js/lhgdialog/lhgdialog.min.js?s=facebook"></script>
    <script type="text/javascript" src="/static/Skins_/tableEx/js/tableEx.js"></script>
    <!--引入结束-->
    <!--原来表格样式-->
    <link rel="stylesheet" href="../../static/Skins/default/css/table.css" type="text/css" />
    <script>
        $(function(){
            $(".t").removeClass("cur");
            $("#h${i.head}").addClass("cur");
        });
        function doadd(){
            var v=showModal("/f00/fun/list?act=update",480,320)
            if (v.status){
                v.act="add";
                v.r=getRnd();
                blockui("保存数据...");
                $.post(
                        "/f00/fun/ajax",
                        v,
                        function(data){
                            alert("成功");
                            location.href="/f00/fun/list?head=${i.head}";
                        }
                        ,"json"
                );
            }
        }
        function doedit(id){

            var v=showModal("/f00/fun/list?act=update&id="+id+"&r="+getRnd(),480,320)
            if(v.status){
                v.act="edit";
                v.r=getRnd();
                blockui("保存数据...");
                $.post(
                        "/f00/fun/ajax",
                        v,
                        function(data){
                            alert("成功");
                            location.href="/f00/fun/list?head=${i.head}";
                        }
                        ,"json"
                )
            }
        }
        function dodel(id){
            if(confirm("确认删除?")){
                var v={}
                v.act="del";
                v.id=id;
                v.r=getRnd();
                $.post(
                        "/f00/fun/ajax",
                        v,
                        function(data){
                            alert("成功");
                            location.href="/f00/fun/list?head=${i.head}";
                        },
                        "json"
                );
            }

        }
        function doimport(){
            var v=showModal("/f00/fun/import?r="+getRnd(),480,640);
            location.href="/f00/fun/list?head=${i.head}";
        }
        function doexport(){
            location.href="/f00/fun/export?r="+getRnd();
        }
    </script>
</head>
<body>
<div class="crumbs">
    <a href="">系统</a><a href="">用户权限</a><span>功能</span>
    <div class="mininav"><a href="/static/welcome.html" rel1="tips_n" original-title="首页"><b class="icons ihome"></b></a><a href="javascript:;" onclick="showModal('/static/hlp/f00/f0021.html',600,360)" rel1="tips_n" original-title="帮助"><b class="icons ihelp"></b></a><a href="javascript:;" onclick="showModal('/f00/feedback?funno=f0021',800,480)" rel1="tips_n" original-title="反馈"><b class="icons ibug"></b></a></div>
</div>
<form action="/f00/f0021/list" method="post" id="form1" style="margin: 5px;">
    <input type="hidden" name="act" value="search" id="act"/>
    <div class="tool_tab">
        <ul>
            <li class="t" id="h10"><a href="/f00/fun/list?head=10"><span>存款</span></a></li>
            <li class="t" id="h20"><a href="/f00/fun/list?head=20"><span>银行借款</span></a></li>
            <li class="t" id="h30"><a href="/f00/fun/list?head=30"><span>公司间借款</span></a></li>
            <li class="t" id="h40"><a href="/f00/fun/list?head=40"><span>担保</span></a></li>
            <li class="t" id="h50"><a href="/f00/fun/list?head=50"><span>统计</span></a></li>
            <li class="t" id="h00"><a href="/f00/fun/list?head=00"><span>系统</span></a></li>
        </ul>
    </div>
    <div class="tool_table">

        <div class="button"><a href="#" onclick="doadd('${i.head}')" class="button_gray"><b class="icons iadd"></b>增加</a></div>
        <div class="button"><a href="#" onclick="doexport('${i.head}')" class="button_gray"><b class="icons iout"></b>导出</a></div>
        <div class="button"><a href="#" onclick="doimport('${i.head}')" class="button_gray"><b class="icons iin"></b>导入</a></div>
    </div>
    <!--引入查询框-->


    <div id="rdata" style="border: 2px solid #444;" >
        <table class="table" style="margin:0px">
            <thead>
            <tr>
                <th>功能编号</th>
                <th>功能名称</th>
                <th >操作</th>
            </tr>
            </thead>
            <tbody>
            <!--将datas修改为i.recs-->
            %for data in i.recs:
            <tr>
                <td><div class="edit" id="funno_${data.id}">${data.funno}</div></td>
                <td><div class="edit" id="funname_${data.id}">${data.funname}</div></td>
                <td><a href="javascript:;" onclick="doedit('${data.id}')">修改</a> | <a href="javascript:;" onclick="dodel('${data.id}')">删除</a></td>
            </tr>
            %endfor
            </tbody>
        </table>
    </div>
</form>
</body>
</html>